import { get, post,put} from './http';

//首页
export const List = p => get('/api/app/recommend/appIndex', p);
// 详情页
export const detail = p => get(`/api/app/courseInfo/basis_id=${p}&type=2`, p);
export const Chapter = p => post(`/api/app/courseChapter?id=${p}`, p);
export const SysCourse = p => post(`/api/app/sysCourseList?id=${p}`, p);
// 课程页
export const classify = p => get(`api/app/courseBasis?page=${p}&limit=10`, p);
// 
export const page = p => get(`/api/app/courseClassify`, p);
// 报名
export const Order = p => post(`/api/app/order/downOrder?shop_id=${p.id}&type=${p.type}`, p);
// 收藏 取消
export const collect = p => get(`/api/app/collect?course_basis_id=${p}&type=1`, p);
export const cancel = p => put(`/api/app/collect/cancel/${p}/1`, p);

// 搜索
export const search = p => get(`/api/app/courseBasis?page=${p.page}&limit=${p.limit}&course_type=${p.course_type}&keywords=${p.keywords}`, p);

// 登录接口
export const Login = p => post(`/api/app/login`, p);
// 验证码接口
export const yanMA = p => post(`/api/app/smsCode`, p);
// 修改密码接口
export const Pass = p => post(`/api/app/password`, p);
// oto接口
export const otoList = p => get(`/api/app/otoCourse?limit=10`, p);
//oto选择老师条件 /app/otoCourseOptions?
export const otoconditon = p => get("/api/app/otoCourseOptions")
// 个人信息接口
export const userInfo = p => get(`/api/app/userInfo`, p);
// 上传头像
export const Image = p => post(`/api/app/public/img/${p}`, p);
// 更新个人信息
export const news = p => put(`/api/app/user`, p);
export const attrs = p => get(`/api/app/module/attribute/1`, p);
// 我的接口
export const Mag = p => post(`/api/app/message/classifyMessage`, p);
export const Center = p => get(`/api/app/getUCenterInfo`, p);
// 3级联动省市区

export const city = p => get(`/api/app/sonArea/${p}}`, p);
// 我的特色课
export const course = p => get(`/api/app/myStudy/${p}`, p);


